<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="template_repair :: header(~{::title})">
    <meta charset="utf-8"/>
    <title th:text="维修申请"></title>
</head>
<body th:replace="template_repair :: body(~{::#custom-step1},~{::#step1},~{::script})">
<div id="step1">
    <div class="layui-custom-start">
        <div class="layui-custom-step">
            <span class="layui-custom-span green">开始</span>
        </div>
    </div>
    <div class="layui-custom-line">
        <div class="layui-custom-step">
            <span class="layui-custom-span green"></span>
        </div>
    </div>
    <div class="layui-custom-item">
        <div class="layui-custom-step">
            <span class="layui-custom-span yellow">开始填报</span>
        </div>
        <div class="layui-custom-line">
            <span class="layui-custom-span red"></span>
        </div>
        <div class="layui-custom-step">
            <span class="layui-custom-span red">任务分配</span>
        </div>
        <div class="layui-custom-line">
            <span class="layui-custom-span red"></span>
        </div>
        <div class="layui-custom-step">
            <span class="layui-custom-span red">工单确认</span>
        </div>
        <div class="layui-custom-line">
            <span class="layui-custom-span red"></span>
        </div>
        <div class="layui-custom-step">
            <span class="layui-custom-span red">处理反馈</span>
        </div>
        <div class="layui-custom-line">
            <span class="layui-custom-span red"></span>
        </div>
        <div class="layui-custom-step">
            <span class="layui-custom-span red">处理评价</span>
        </div>
    </div>
    <div class="layui-custom-line">
        <div class="layui-custom-step stop ">
            <span class="layui-custom-span red"></span>
        </div>
    </div>
    <div class="layui-custom-step stop">
        <span class="layui-custom-span red">结束</span>
    </div>
</div>
<div id="custom-step1">
    <blockquote class="site-text layui-elem-quote">报修人信息</blockquote>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">报修编号</label>
            <div class="layui-input-block">
                <div class="layui-input" th:text="${entity.lcbh}"></div>
                <input type="hidden" name="lcbh" lay-verify="required"
                       autocomplete="off" th:value="${entity.lcbh}" class="layui-input"/>
                <input type="hidden" name="lcmc" th:value="${entity.lcmc}==null?${user.name}+'发起的报修流程':${entity.lcmc}"/>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">填报时间</label>
            <div class="layui-input-block">
                <div class="layui-input" th:text="${entity.bxsj}"></div>
                <input type="hidden" name="bxsj" lay-verify="required"
                       th:value="${entity.bxsj}" autocomplete="off" class="layui-input"/>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">报修人</label>
            <div class="layui-input-block">
                <div class="layui-input" th:text="${user.name}"></div>
                <input type="hidden" name="bxr" lay-verify="required"
                       th:value="${entity.bxr}==null?${user.id}:${entity.bxr}"/>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="xm" lay-verify="required"
                       maxlength="200" th:value="${entity.xm}==null?${user.name}:${entity.xm}"
                       placeholder="姓名" autocomplete="off" class="layui-input"/>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">院系/部门</label>
            <div class="layui-input-block">
                <div class="layui-input" th:text="${user.orgname}">
                </div>
                <input type="hidden" name="bmyx" lay-verify="required"
                       maxlength="50" th:value="${entity.bmyx}==null?${user.orgid}:${entity.bmyx}"
                       class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input type="text" name="lxdh" lay-verify="required"
                       maxlength="200" th:value="${entity.lxdh}"
                       placeholder="联系电话" autocomplete="off" class="layui-input"/>
            </div>
        </div>
    </div>
    <blockquote class="site-text layui-elem-quote">服务信息</blockquote>
    <blockquote class="site-text layui-elem-quote">
        1、请认真选择与实际报修事项一致的服务地点与分类;<br>
        2、不同的维修信息分开填写，不可以在一个申请单中填写多个类别的维修事项;<br>
        3、如果有图片或者更详细的文字说明，请上传附件;<br>
        4、同一地点的相同维修事项，只可填写一次
    </blockquote>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">服务地点</label>
            <div class="layui-input-block">
                <select name="fwddly" lay-search lay-filter="fwddly">
                    <option value="" th:text="--请选择服务地点--"></option>
                    <option th:each="p:${lyqyList}" th:value="${p.id}" th:text="${p.qymc}"
                            th:selected="${entity.fwddly == p.id}?true:false">
                    </option>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">门牌号/室</label>
            <div class="layui-input-block">
                <input type="text" name="fwdd" lay-verify="required"
                       maxlength="200" th:value="${entity.fwdd}"
                       placeholder="门牌号/室" autocomplete="off" class="layui-input"/>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">服务分类</label>
            <div class="layui-input-block">
                <select name="fwdl" lay-search lay-filter="fwdl">
                    <option value="" th:text="--请选择服务类别--"></option>
                    <option th:each="p:${fwdlList}" th:value="${p.id}" th:text="${p.fwdl}"
                            th:selected="${entity.fwdl == p.id}?true:false">
                    </option>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">服务类型</label>
            <div class="layui-input-block">
                <select name="bxlx" lay-search lay-filter="bxlx">
                    <option value="" th:text="--请选择服务类型--"></option>
                    <option th:if="${listFwfl}" th:each="p:${listFwfl}" th:value="${p.id}"
                            th:text="${p.fwfl}"
                            th:selected="${entity.bxlx == p.id}?true:false">
                    </option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item ">
            <label class="layui-form-label">故障描述</label>
            <div class="layui-input-block">
                <input name="gznr" type="hidden" id="gznr" th:value="${entity.gznr}"/>
                <div class="layui-input" th:classappend="${entity.fwdlmc}==null?'gznr':''"  id="fwdlmc" th:text="${entity.fwdlmc}==null?'点击选择故障描述':${entity.fwdlmc}"></div>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">描述补充</label>
            <div class="layui-input-block">
                             <textarea type="text" name="gzms" lay-verify="required" maxlength="100" th:text="${entity.gzms}"
                       ·                placeholder="请输入备注" autocomplete="off" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>
    <div class="layui-custom-inline">
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">附件</label>
            <div class="layui-input-block">
                <div class="upload">
                    <a th:href="${entity.fj}" name="imagePc" id="customImage"
                       th:style="${entity.fj!=null?'':'display:none'}" class="imagePc layui-custom-img"
                       th:text="${#strings.substringAfter(entity.fj,'file/')}"></a>
                    <button type="button" class="layui-btn" th:unless="${entity.fj!=null}" id="imagePc1">
                        <i class="layui-icon">&#xe67c;</i>上传附件
                    </button>
                    <button type="button" class="layui-btn" th:if="${entity.fj!=null}" id="imagePc">
                        <i class="layui-icon">&#xe67c;</i>修改附件
                    </button>
                    <input type="hidden" name="fj" th:value="${entity.fj}" id="imagePca"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-custom-form-item">
            <label class="layui-form-label">是否填报过</label>
            <div class="layui-input-block">
                <input type="radio" name="sftbg" value="1" title="是"
                       th:checked="${entity.sftbg ==null || entity.sftbg == 1}?true:false"/>
                <input type="radio" name="sftbg" value="0" title="否"
                       th:checked="${entity.sftbg == 0}?true:false"/>
            </div>
        </div>
    </div>
    <div class="layui-custom-button">
        <div class="layui-btn layui-btn-normal custom-save">保存</div>
        <div class="layui-btn layui-btn-normal custom-tj">提交</div>
    </div>
</div>
<script th:src="@{/static/resources/js/apply.js}" type="text/javascript" media="all"></script>
</body>
</html>